//
//  ShopCell.m
//  Pianke
//
//  Created by BetaTheta on 16/1/21.
//  Copyright © 2016年 BetaTheta. All rights reserved.
//

#import "ShopCell.h"

@interface ShopCell ()
@property (nonatomic, retain) UIButton *urljumpBtn;
@end
@implementation ShopCell
- (void)dealloc
{
    [_titleLabel release];
    [_coverImg release];
    [_urljumpBtn release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        //
        self.titleLabel = [[UILabel alloc] init];
        _titleLabel.backgroundColor = [UIColor orangeColor];
        [self.contentView addSubview:_titleLabel];
        [_titleLabel release];
        //
        self.coverImg = [[UIImageView alloc] init];
        _coverImg.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:_coverImg];
        [_coverImg release];
        //
        self.urljumpBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        _urljumpBtn.backgroundColor = [UIColor blueColor];
        [self.contentView addSubview:_urljumpBtn];
        
    }
    return self;
    
}
// 布局
- (void)layoutSubviews
{
    [super layoutSubviews];
    _coverImg.frame = CGRectMake(10, 10, self.contentView.frame.size.width - 20, 180);
    _titleLabel.frame = CGRectMake(10, 200, self.contentView.frame.size.width - 80, 30);
    _urljumpBtn.frame = CGRectMake(self.contentView.frame.size.width - 70, 200, 60, 30);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
